package com.guli.gulimall.member.controller;

import com.guli.common.utils.R;
import jdk.nashorn.internal.ir.annotations.Reference;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liuyuhang
 * @ClassName HelloController.java
 * @createTime 2022/04/20 21:24
 */
@RestController
@RequestMapping("hello")
@RefreshScope
public class HelloController {
    @Value("${person.name}")
    public String name;

    @Value("${person.age}")
    public String age;

    @RequestMapping("/getMsg")
    public R getMsg(){
        return R.ok().put("name",name).put("age",age);
    }
}
